/**
 * @Description TODO
 * @Author hhy
 * @Date 2020/9/24 10:56
 */
public class Main {
    public static void main(String[] args) {
        A a = new PrintA();
//        a.printA4();
//        a.printBW();

        B b = new PrintB();
//        b.printA5();
//        b.printColor();

        C c = new PrintC();
//        c.printA4();
//        c.printA5();
//        c.printBW();
//        c.printColor();
        Object temp = b;

        if (temp instanceof C){
            System.out.println("我可以A4/A5纸,彩色和黑白");
        }else if (temp instanceof A){
            System.out.println("我可以打印A4纸和黑白");
        }else {
            System.out.println("我可以打印A5纸和彩色");
        }
    }
}
